﻿package mortal.game.net.rmi.login
{
    import Message.Login.*;
    import Message.Public.*;
    import mortal.common.net.*;
    import mortal.game.net.*;

    public class LoginRMI extends RMIBase
    {
        public var loginProxy:ILoginPrxHelper;
        private static var _instance:LoginRMI;

        public function LoginRMI()
        {
            this.loginProxy = new ILoginPrxHelper();
            if (_instance != null)
            {
                throw new Error("CreateRoleRMI 单例");
            }
            new SLoginInfoShow();
            return;
        }// end function

        override public function set rmiSession(param1:RMISession) : void
        {
            param1.session.messageHandler = new LoginMessageHandler();
            super.rmiSession = param1;
            return;
        }// end function

        override protected function initProxy() : void
        {
            session.registerProxy(this.loginProxy);
            return;
        }// end function

        public static function get instance() : LoginRMI
        {
            if (_instance == null)
            {
                _instance = new LoginRMI;
            }
            return _instance;
        }// end function

    }
}
